package com.jk.controller;

import com.alibaba.fastjson.JSONObject;
import com.jk.entity.ClothEntity;
import com.jk.entity.cartOrderEntity;
import com.jk.service.ShopService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Set;

/**
 * @详细介绍类情况.
 * @ClassName ShopController
 * @Author 张荣鑫
 * @Date 2022/6/2
 * @Version 1.0
 */
@RestController
@RequestMapping("zrx")
public class ShopController {
    @Autowired
    private ShopService shopService;
    @Autowired
    private RedisTemplate redisTemplate;

    /**
     * @方法名称:查询新品列表
     * @author 张荣鑫
     * @return java.lang.Object
     * @exception
     * @date 2022/6/2 10:14 
     */
    @RequestMapping("queryAllShop")
    public HashMap<String, Object> queryAllShop( String name){
        return shopService.queryAllShop(name);
    }

    /**
     * @方法名称:查看商品
     * @author 张荣鑫
     * @return java.lang.Object
     * @exception
     * @date 2022/6/6 10:30 
     * @param shopId
     */
    @RequestMapping("getShopBynum")
    public Object getShopBynum(Integer shopId){
    return shopService.getShopBynum(shopId);
    }

    /**
     * @方法名称:添加购物车
     * @author 张荣鑫
     * @return void
     * @exception
     * @date 2022/6/6 15:43 
     * @param shopId
 * @param num
     */
    @RequestMapping("addshopCar")
    public String  addshopCar(Integer shopId,Integer num ){
        return shopService.addshopCar(shopId,num);
    }
    /**
     * @方法名称:查询男子商品列表
     * @author 张荣鑫
     * @return java.util.HashMap<java.lang.String, java.lang.Object>
     * @exception
     * @date 2022/6/7 14:12 
     */
    @RequestMapping("queryManShop")
    public HashMap<String, Object> queryManShop(){
        return shopService.queryManShop();
    } 
    /**
     * @方法名称:查询女子商品列表
     * @author 张荣鑫
     * @return java.util.HashMap<java.lang.String, java.lang.Object>
     * @exception
     * @date 2022/6/7 14:47
     * @param 
     */
    @RequestMapping("queryWomanShop")
    public HashMap<String, Object> queryWomanShop(){
        return shopService.queryWomanShop();
    }
    /**
     * @方法名称:查询特价商品
     * @author 张荣鑫
     * @return java.util.HashMap<java.lang.String, java.lang.Object>
     * @exception
     * @date 2022/6/9 11:22
     * @param 
     */
    @RequestMapping("querytejia")
    public HashMap<String, Object> querytejia(){
        return shopService.querytejia();
    }


}